package com.messe.api.controller;

import javax.annotation.Resource;

import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.messe.base.exception.XPFBadRequestException;
import com.messe.base.pageModel.PageDo;
import com.messe.base.pageModel.PageMo;
import com.messe.base.service.IVisitorService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(description = "Visitor Data")
@CrossOrigin
@RestController
public class MesseInforAPI {
	
    @Resource
    private IVisitorService iVisitorService;
    
/*    @ApiOperation(value = "get exhibitor Leads database")
	@RequestMapping(value = "/getUser", method = RequestMethod.POST, produces = {
			MediaType.APPLICATION_JSON_UTF8_VALUE })
    public Object query(PageDo pageDo) throws XPFBadRequestException {
//        PageDo pageDo = new PageDo(rows, page);
        iSpecialManagement.findDataGrid(pageDo);
        return pageDo;
    }*/

    @ApiOperation(value = "get visitor Leads database")
   	@RequestMapping(value = "/getVisitorDB", method = RequestMethod.POST, produces = {
   			MediaType.APPLICATION_JSON_UTF8_VALUE })
       public Object getVisitorDB(PageMo pageMo) throws XPFBadRequestException {
           PageDo pageDo = new PageDo(pageMo.getRows(), pageMo.getPage());
           iVisitorService.getVisitorDB(pageDo, pageMo);
           return pageDo;
       }
}
